Repository navigation
feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards - #37676
Conversation
… schema, tables, kit) Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…d keys and defs, semantic entries), pins Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…ackage, name) The knowledge service keeps its sources in a registry keyed by (package, name) and filled through two doors that parse with the one schema: the metadata loader (boot, a published knowledge_source change, a metadata reload) and registration in code, which takes the package-less slot and refuses a retired key with its prescription instead of converting it. A caller names a source by its face; a bare name resolves by ADR-0150 D3 and a name several sources answer to is refused 409. An index is keyed by the source's index key, so two packages' sources of one name share no document. A removed item is unregistered and its index dropped; the reap guard's object set follows the sources. The file/http arms, the '*' content member, indexDocument and deleteDocument are gone with their branches. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
… write doors Guard one is a row in the existing per-type write capability table: a knowledge_source write through /meta (REST and the dispatcher) and through the MCP draft door needs manage_knowledge_sources beside manage_metadata. Guard two asks the knowledge service to admit an authored source for its author before it is saved: the author must themselves be able to search what the source would index. A verdict that cannot be reached refuses 503; over MCP the human is judged. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…e as the index key knowledge-memory, knowledge-pgvector and knowledge-turso remove every generation of a source, the one under construction included, and what they recorded about the index. An adapter reads the index key from ctx.source.name. os knowledge status prints the holding package and no source kind. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…edge service A deployment that holds knowledge_source items and mounts no knowledge service is valid and inert: one warn line names the items. The type joins the package-scoped read types and the namespace co-owner tests. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…, skills rows, changeset The showcase ships a task-notes source over the memory adapter. The protocol and RAG pages describe the type, its loader, who may author a source and one name per source. Generated references, the liveness ledger row and the changeset with its ADR-0087 registrations ride along. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
The variant ledger and the empty-state registry drop the entries of the retired file and http source kinds; llms.txt counts one module fewer under ai; the platform checklist waives the new kind with what retires the waiver; the metadata form bundles carry the type's label in every locale. skills/objectstack-platform/SKILL.md keeps only the knowledgeSources row: the two comment trims that made room for it are reverted (ruling A on #32584 allows the row and nothing else). Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…ases the gates ask for The system-context page keys the knowledge row to the symbols that hold the elevation reads now, the save admission included. Four edited suites pay their first load of a dynamically imported package at collection, and the showcase aliases the knowledge service and the in-memory store to source. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…-23bpce Conflicts: the migration registry template (main's wording of the two major-19 regions kept), the CLI knowledge test fixture, the pgvector adapter's search refusal and the knowledge service's reindex chain and unmounted-adapter refusal. Code and fixtures main added against the 18 source shape (id, contentFields, indexDocument) follow the 19 shape, and the RAG guide separates writing a source from wiring the plugins by hand. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…r 19, skills ceiling by the row's delta The spec package reads 19 on main, so the declared default of ai/KnowledgeSource:refresh moves from the major-18 rows to major 19, the only major that authorises it now. skills/objectstack-platform/SKILL.md: the ceiling moves 6151 -> 6156 for the knowledgeSources enumeration row alone (+20 priced bytes), under ruling A on #32584 and #32673 letter A. Nothing else in the file changes. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
The teaching of knowledge_source in skills/objectstack-ai rides #37310. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
… drop the embedding row from the protocol map The three conversions admitted with the type join the removal-version pin (every retired key refused from 19 on), and the protocol map no longer links the removed embedding module. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…-23bpce Major 19's conversion list stacks both sides: the permission conversion main landed and the knowledge source's three, each at its own order. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
The authorable-surface baseline keeps the knowledge source's retired lines out and takes main's new skill key; api-surface, export-origins and the skills reference index are regenerated from the merged tree. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 12 package(s): 93 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 22 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 192 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 588995420552e436918b6ad16fddab388edb120e && git checkout 588995420552e436918b6ad16fddab388edb120e
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ddc96d8a4280c69305dd541005cacfbe3e58f4c5 261dc7527bbb002633b5724a365f3e3e3be4f15a && git checkout -B drift-repro ddc96d8a4280c69305dd541005cacfbe3e58f4c5 && git merge --no-ff 261dc7527bbb002633b5724a365f3e3e3be4f15a
node scripts/docs-audit/affected-docs.mjs --json ddc96d8a4280c69305dd541005cacfbe3e58f4c5
|
Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…orm-objects count the knowledge source Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…edge source strings Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
… item 6 prescribes One row under AI (order 5, 高级), in the spelling of the ai_context row; the Studio menu placement test reads this table. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…g main The merge of main at 9b50fed kept this branch's side of two generated paths both sides had moved. Regenerated on the merged tree: the reference index counts main's new ui page (17 pages, 185 schemas; 222 pages and 1730 schemas in all), and the ai authorable surface carries main's retired marker on AIModelConfig:provider. Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X 席位核对 (delta 5, merge + regen)Head-sha: Regen-provenance: Gates: CI is green on this head (62 succeeded, 0 failed). The mergeable state is clean. The dogfood battery on this head is os-dev report 7211969284 on #37304. The landing terms are unchanged. |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Landing at |
…-23bpce # Conflicts: # packages/cli/test/metadata-type-schema-gate.test.ts # packages/metadata-protocol/src/protocol.legacy-overlay-delete.test.ts # packages/platform-objects/src/apps/translations/bare-type-display-echo-decisions.test.ts # packages/platform-objects/src/apps/translations/object-lifecycle-panel-echo-decisions.test.ts # packages/runtime/src/app-plugin.ts # packages/spec/liveness/README.md # packages/spec/scripts/liveness/check-liveness.mts # packages/spec/src/kernel/metadata-create-seeds.test.ts # scripts/check-skills-token-ratchet.mjs # scripts/check-stack-collection-maps.mjs # ui/packages/i18n/src/locales/ar.ts # ui/packages/i18n/src/locales/de.ts # ui/packages/i18n/src/locales/en.ts # ui/packages/i18n/src/locales/es.ts # ui/packages/i18n/src/locales/fr.ts # ui/packages/i18n/src/locales/ja.ts # ui/packages/i18n/src/locales/ko.ts # ui/packages/i18n/src/locales/pt-BR.ts # ui/packages/i18n/src/locales/ru.ts # ui/packages/i18n/src/locales/zh-Hans.ts # ui/packages/i18n/src/locales/zh-Hant.ts
The merge of main at e69fa46 took no text merge on six generated paths both sides had moved. Regenerated on the merged tree, so each carries both the form type main admitted and the knowledge source this branch admits: the meta URL spelling data, the ai export origins, and four reference pages (the index, the metadata plugin, the metadata API and the assembled package API). Claude-Session: https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx Co-authored-by: Claude <noreply@anthropic.com>
…-23bpce # Conflicts: # scripts/check-skills-token-ratchet.mjs
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Delta round 3. It builds on the delta record 7208323495 (head Inputs read: the five merges of Check-runs on the head as read at 09:31Z, 71 in all: 62 success, 9 skipped, none failed, none pending. The nine skipped are the opt-in, schedule and queue-only jobs (Temporal Conformance, Dogfood Verify CLI, the unexpanded Dogfood matrix row, UI Published Artifacts, the schedule gate, the packed-tarball smoke, the 18.x upgrade harness and the two queue verdicts). Test Core 1 to 10 of 10, Test UI 1 to 16 of 16, the four Type Check lanes, every Lint lane, Spec property liveness, Check Changeset and the PR-side Governed Surface Queue Guard are success. One fact for the seat, outside the verdict: at 09:31Z GitHub reads this head as not mergeable. ① Derived judgmentsNo hop moves an accept-set or a public-surface judgment of the earlier rounds.
② Semver levelClause-②: yes (narrowing) Unchanged. No hop touches the changeset; its levels, its ③ Boundary flagsSQL push-down: no hop adds an id materialisation or an in-app join; no hop changes a query.
④ Design judgmentOn what the hops move only. The registry tie is settled by the file's own rule and is between conversions of disjoint types. The censuses that count metadata types are each the sum of two independent arrivals, and the generated pages agree with them. The two ratchet rows sit at their files' measurements. Nothing in the hops changes what a knowledge source parses, who may author one, or what a caller is served. No must-fix, no should-fix. N2, N5 and N6 stand as the seat accepted them in 7206423476; none is touched here. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Contract reviewServed-tier: Delta round 4. It builds on the delta record 7214835942 (head The hop is one merge: Inputs read: the remerge diff of Check-runs on the head as read at 09:37Z, 38 in all: 4 success, 9 skipped, 25 in progress, none failed. The four concluded are the path filter, the PR-body guards, Check Documentation Links and Check PR Size. The nine skipped are the opt-in, schedule and queue-only jobs record 7214835942 names. Not concluded at this read: every Lint lane (check:i18n runs in one of them) is in progress, and Test Core is not yet expanded: ① Derived judgmentsNo accept-set or public-surface judgment of the earlier rounds moves.
② Semver levelClause-②: yes (narrowing) Unchanged. The hop touches neither the changeset nor the PR body. Main's #37839 arrives by merge and is declared on main in its own changeset. ③ Boundary flagsSQL push-down: the hop adds no id materialisation and no in-app join, and changes no query.
④ Design judgmentOn what the hop moves only. The census of translated rows is main's count plus this PR's one label, pinned at the sum, and it is the only line of the PR's change that differs on the new base. Main's audience-row change and this PR's type meet nowhere but in that census and in separate entries of the same generated bundles. Nothing in the hop changes what a knowledge source parses, who may author one, or what a caller is served. No must-fix, no should-fix. Implemented-by: VERDICT: PASS |
|
repo:objectstack#5 · os-bill · session_01Utp6CYtTDvfPQDzMbZnN5X Landing at |
Requested by Bill · project thread
Fixes #37304
Clause-②: yes (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37310
维护者速读
What changes
New metadata type:
knowledge_source. Registered in the metadata type registry with the one schemaKnowledgeSourceSchema; a stack carries its sources in the new top-level collectionknowledgeSources(*.knowledge-source.tsor.yml). An item can be created and changed at run time (Studio, MCP) and takes no environment overlay. Studio's menu lists the type under AI, and ADR-0084's type table carries its row.New platform capability:
manage_knowledge_sources. Platform administrators hold it by default. Nothing else grants it.idbecomesname,source.contentFieldsbecomessource.content, a non-empty list of field names;'*'is refused with the instruction to list the fields, and an empty-string member is refused too (it names no field).embedding,vectorStore,adapterConfig,refresh.cronand thefile/httpsource kinds are retired with their ADR-0087 entries (three conversions, six retired keys, six retired defs, four semantic entries on protocol 19).os migrate meta --from 18lists every edit and--writeapplies the ones it can prove.service-knowledge,knowledge-source-loader.ts).KnowledgeServicePluginreads the published items when it starts and follows the type while it runs: an added source is registered and built when a build is due; a changed one is registered again (a changedwhereormetadataFieldsrebuilds inside the generation, a changedcontentorsplitbuilds a new one); a removed one is unregistered and its index dropped. The reap guard's object set follows the sources.knowledge-source-registry.ts), under the maintainer's rulings on this card (record 7192063608, forks 6 and 4d, both A). A source is held by(package, name). A source registered in code belongs to no package; it shares one slot with an environment-authored item of the same name, and the second of the two to arrive is refused409 RESOURCE_CONFLICT, naming both doors. A package's source of the same name is a second source. Code names a source by its face: the bare name for the package-less one,NAMESPACE-NAMEfor a package's; a bare name several sources answer to is refused409, naming the candidates.searchhits carry the face assourceId. NoIKnowledgeServicesignature changes for addressing.IKnowledgeAdapter.dropSource?(ctx), implemented byknowledge-memory,knowledge-pgvectorandknowledge-turso; the contract suite (@objectstack/service-knowledge/testing) takesimplements.dropSource. An adapter reads the source's index key fromctx.source.name(it wasctx.source.id): the bare name for a package-less source, so an existing index is found under the same key and nothing is rebuilt.knowledge_sourcethrough/meta(REST and the dispatcher: save, publish, rollback, delete) and through the MCP draft door needsmanage_knowledge_sourcesbesidemanage_metadata:403 PERMISSION_DENIEDnaming the capability,401for an anonymous caller. It is one row in the existing per-type tableMETA_TYPE_WRITE_CAPABILITIES(packages/rest/src/meta-item-read-gate.ts), so the three doors that already ask that table ask it for this type too. The package doors ask it as well (maintainer's ruling A, record 7207325373 on knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304): each of the twelve doors that write an existing package (enable, disable, publish, publish-drafts, discard-drafts, the commit revert, rollback, revert, adopt-orphans, duplicate, the manifest update, delete) refuses a caller without the capability403when the package holds a knowledge source: an item, a pending draft, or, for the commit revert and the rollback, a commit that touched one. A package that holds none is written as before; a holding that cannot be read refuses503. Two doors are not asked, see Acceptance notes.search, a system object withoutenable.aiReadable, or a field the author may not query refuses the save403, naming the object or the field; a verdict that cannot be reached refuses503. The fields a source'swherereads are judged with the fields it serves, at save and at search. A knowledge service that is registered and cannot be resolved refuses the save503at every door (REST, the dispatcher, MCP). The duplicate door admits each knowledge source it would copy for the caller before anything is copied, and refuses the whole copy when one is refused. Over MCP the human is judged.IKnowledgeService.indexDocumentanddeleteDocumentare removed with thefile/httpbranches that served them.@objectstack/spec/ai. Theembeddingmodule:EmbeddingModelSchema,VectorStoreSchema,VectorStoreProviderSchemaand the typesEmbeddingModel,VectorStore,VectorStoreProvider(the knowledge source was their only composer). The retired source kinds:FileKnowledgeSourceSchema,HttpKnowledgeSourceSchema,KnowledgeSourceKindSchemaand the typesFileKnowledgeSource,HttpKnowledgeSource,KnowledgeSourceKind. The changeset lists the same twelve.packages/objectql). A deployment that holdsknowledge_sourceitems and mounts no knowledge service says so once at boot, at warn, naming the items; it is not a boot refusal.os knowledge statusprints the package that holds a source and no longer a source kind.examples/app-showcaseshipsshowcase_task_notes(objectshowcase_task, adaptermemory) and mounts the knowledge service and the memory store.content/docs/protocol/knowledge.mdxandcontent/docs/ai/knowledge-rag.mdxdescribe the type, the loader, who may author a source, and one name per source; the generated references follow.knowledgeSourcesjoins the top-level key list inskills/objectstack-platform/SKILL.md.skills/objectstack-ai/SKILL.md's compiledsupportKbexample changes two keys (idtoname,contentFieldstocontent) because the old spelling is now refused at parse. Teaching the type (prose, tables, evals) rides skills/objectstack-ai and the MCP authoring contract teach knowledge_source as metadata: name, an explicit content list, no wildcard, the retired keys, and a create seed #37310.scripts/check-skills-token-ratchet.mjs):skills/objectstack-platform/SKILL.mdwas at zero headroom (24603 priced bytes, 6151 tokens, after feat(core): requires knowledge mounts the knowledge service and one vector store #37442's row); theknowledgeSourcesrow adds 20 bytes, so the priced text is 24623 bytes, 6156 tokens, and the ceiling moves 6151 to 6156, pinned at the measurement. Nothing else in the file is cut and nothing rides along.skills/objectstack-ai/SKILL.mdstays at 6799 tokens under its ceiling of 6801.defineStack()top-level key, or a live member of a schema symbol bound to a registered exhaustive skills section, carries the matching skills enumeration row in the same PR. Only that row; prose, examples and evals still go to the skills sub-card."Tests
packages/spec/src/ai/knowledge-source.test.ts: the strict schema,'*'refused, an empty-string member refused (andminLength: 1in the JSON Schema), every retired key answered with its prescription.packages/services/service-knowledge/src/__tests__/knowledge-source-registry.test.ts(new): the slot rules above, both orders of arrival at each door, face resolution and the409with its candidates..../knowledge-source-loader.test.ts(new): boot read, add, change (each of the two rebuild arms), remove withdropSource, an adapter withoutdropSource, the reap guard following the sources..../knowledge-source-admission.test.ts: each refusal of guard two and its fail-closed503; the fieldswherereads (keys,$and/$or/$not,{ $field }comparands) judged at save and at search.dropSource: trueinknowledge-memoryandknowledge-turso;knowledge-pgvectordeclares it incontract.live-postgres.test.ts(see Remaining).packages/rest/src/meta-type-write-capability.test.ts: every write shape of aknowledge_sourcefor a caller withmanage_metadataalone, withmanage_platform_settings, and with a record grant:403 PERMISSION_DENIED, store unchanged, no protocol call; a holder of both saves, publishes, rolls back and resets; the capability withoutmanage_metadatais refused by the door's own admission.packages/rest/src/meta-write-door-capability-enumeration.test.ts,packages/runtime/src/domains/meta-save-capability-gate.test.ts,packages/runtime/src/domains/mcp-authoring.test.ts: guard two at REST, the dispatcher and the MCP save door (the human is judged); on a real kernel, a knowledge service whose factory throws answers503at the dispatcher and at MCP, and one never registered is not asked.packages/runtime/src/domains/meta-type-write-capability-parity.test.ts: REST and the dispatcher answer the same for the new row.packages/runtime/src/domains/packages-knowledge-source-gate.test.ts(new): each of the twelve package doors refuses amanage_metadata-only caller when the package holds a source (item or draft) and the writer never runs; a holder goes on with no listing read; a package with none answers as before; a listing that throws refuses503; the engine's own call is not asked; the commit revert and the rollback read the timeline; the duplicate door's admission of each copied source; a host with no metadata store holds none; the install door and the ensure-customization door are not asked.packages/runtime/src/domains/packages-ensure-customization.test.ts: a base that holds a knowledge source (a registered item and a stored row) gets a pair that holds none, and the door writes one manifest and no row.packages/objectql/src/knowledge-source-unserved.test.ts(new): the boot notice.packages/metadata-core/src/knowledge-source-save-admission.test.ts(new): the admission seam.Acceptance notes
skills/**and declares a narrowing.manage_knowledge_sourcesbesidemanage_metadata, platform administrators only); and ruling A of 2026-11-27 (record 7207325373): every write door of an existing package asks the capability when the package holds a knowledge source, and install stays unasked. The ADR-0150 rows ride ADR-0150: record the maintainer's ruling on #37304 addendum points 4 and 6 (code-registered knowledge sources) #37545. One ADR line is edited here, with the zone's approval (claim comment 7203310811 on knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304, amended by 7204020473): ADR-0084's type table gains theknowledge_sourcerow its item 6 prescribes for a type registered after the ruling (AI,ai, 5, 高级), spelled as theai_contextrow is. Nothing else underdocs/adr/**changes.protocol.onMetadataMutation(a save, a publish, a delete, a revert) plus themetadata:reloadedhook (a package published, installed or removed, a dev reload), notmetadataService.subscribe. After either it reads the published set again and reconciles, so a missed event is repaired by the next one.POST /packages): a package's source arrives by that door's own admission, as the ruling leaves it. The ensure-customization door (POST /packages/:id/ensure-customization): it writes nothing of the base and creates an empty pair, so it creates, changes and removes no knowledge source; the seat confirmed this reading on the condition that the pair holds no source, whichpackages-ensure-customization.test.tspins.sys_metadataobject) reads as holding none, by the same rule the protocol's overlay reads use; any other failed read refuses503.manage_metadata.409at the call that names it (resolveSourceRef), listing the candidates; both sources register. Where the host cannot place a package's namespace, the package's face is its bare name, and that name answers409for both sources until the package is placed.409for a bare name two packages hold: 0. The package-less row under a name a package holds: 0. The tree holds one knowledge source,showcase_task_notes(examples/app-showcase/src/ai/task-notes.knowledge-source.ts), and no first-party code registers one through the plugin door.KnowledgeIndexStatusEntry.kindis removed with the source kinds;packageIdis added.registered …and namesindexDocument/deleteDocumentin prose: they are runtime-interface members with no metadata form, and the compiler reports each call (TS2339).knowledge_sourcerows on a kernel that does not hydrate from its database; it registers nothing (plugin.integration.test.tspins the permitted reads and now names this one).dropSourceand a concurrent build in another process: the drop retires the active and the building generation in one transaction but does not hold the builder lock across it, so a build already running in another process could still write its generation afterwards. Not changed here; it is a candidate follow-up.requires: ['knowledge'](feat(core): requires knowledge mounts the knowledge service and one vector store #37442): the token mounts a libSQL or pgvector store, which needs a configured embedder, and the demo runs on the in-memory store with none. A host that mounts the service itself keeps its own, as feat(core): requires knowledge mounts the knowledge service and one vector store #37442 specifies.mainthree times (no rebase). The first merge (at45ed022b) followed feat(core): requires knowledge mounts the knowledge service and one vector store #37442, fix(service-knowledge): a build that loses its lease stops at the next page, and a stalled build is cancelled #37570 and fix(cli): os knowledge rebuild and status give the right answer behind a load balancer #37578: four textual conflicts (the migration registry template, the CLI knowledge test fixture, the pgvector adapter's search refusal, the knowledge service's reindex chain and unmounted-adapter refusal). Code and fixtures those PRs wrote against the 18 source shape follow the 19 shape here:source.idissource.name,contentFieldsiscontent,reportUnmountedAdaptersnames a source by its face, and the unmounted-adapter index test callsreindexSourcenow thatindexDocumentis gone. The second merge (atc2bfa3ef7) was forced by a conflict:mainhad gained its own protocol 19 conversion (permission-view-all-fields-beside-record-bypass), so the conversion registry, the migration registry template and the retired-key pin now carry both sets, sorted as the registry sorts them;packages/spec/authorable-surface/ai.jsonwas merged three ways by hand so that this PR's removals andmain's newai/Skill:contextboth stand; every generated spec surface was regenerated afterwards. The third merge (at8b9b9d235) was forced by fix(lint,metadata-core): a skill's context naming a pack a declared dependency ships no longer warns; the ADR-0150 D3 rule moves to metadata-core #37723, which moved the ADR-0150 D3 rule intopackages/metadata-core/src/package-scoped-resolution.ts:core's file is taken frommain(a re-export) and theknowledge_sourcerow with its comment sits inmetadata-core'sPACKAGE_SCOPED_TYPES;default-changes.tskeeps both protocol 19 entries (main'sai/AIModelConfig:providerand this PR'sai/KnowledgeSource:refresh); the Studio menu placement pin takesmain's move ofpositionand keeps this PR's row. The merge is its own commit andpackages/spec/authorable-defaults/ai.jsonwas regenerated in the next one (737f44341).ai/KnowledgeSource:refreshsits under major 19 indefault-changes.ts(no parsed value changes: the published JSON Schema now states the{}the parser always applied).packages/metadata), the tier list (packages/metadata-protocol), the type-label counts (packages/platform-objects), four golden grant lists (packages/plugins/plugin-security), and the generatedzh-Hantlocale. Each gained the one entry; no product code changed for them. The suites of those packages and the workspace type check now run locally as well (see Verification).45ed21271(comment 7206413701) read PASS with findings, and the seat ordered a rework (7206423476). This head answers it: authoring guards cover more doors and more of what a source reads (the package doors, the duplicate door, the fieldswherereads, the service lookup at the dispatcher and at MCP), thecontentmember refuses the empty string, the changeset lists the twelve removed exports, and this body is corrected on the face collision and states the narrowing counts. The findings' detail is with the seat. Two nits are carried by cards the zone files under knowledge_source: admit the governed metadata type with its loader — registry, stack collection, ADR-0087 renames and retirements, the two authoring guards, one name per source #37304 (ADR-0084 prose; tombstone wording for code-door registrants).packages-publish-drafts-request-conformance.test.ts: the real-protocol case's caller also holdsmanage_knowledge_sources(its engine is one nothing may touch; the case pins the protocol's own order). Assertions unchanged.packages-publish-drafts-probe-caller-context.test.ts: the protocol double gains agetMetaItemsPerPackagestub beside itsgetMetaItemsstub. Assertions unchanged.package-state-host-store.test.ts(a kernel with no driver) anddomains/error-passthrough.test.ts(a protocol double that throws from every member): the caller also holdsmanage_knowledge_sources. Assertions unchanged.packages-ensure-customization.test.ts, "duplicate: 400 before a row is read": the measure changes. The door now reads the source package's knowledge sources to admit them before the copy runs, so the case counts the reads made insideprotocol.duplicatePackage(still 0) instead of every engine read; it also asserts the copy was entered once.mainitself merges cleanly): feat(spec)!: form is a metadata type of its own, and the form doors read a form over both types #37422 (the generated references andscripts/check-skills-token-ratchet.mjs: whichever lands second re-measures the row), refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366 (packages/spec/export-origins/ai.json). Whichever of each pair lands second mergesmain.Verification
First files to read, by risk:
packages/services/service-knowledge/src/knowledge-source-registry.ts: the slot and face rules.packages/services/service-knowledge/src/knowledge-source-loader.ts: what each metadata event does to an index.packages/rest/src/meta-item-read-gate.ts(META_TYPE_WRITE_CAPABILITIES) andpackages/metadata-core/src/knowledge-source-save-admission.ts: the two guards.packages/runtime/src/domains/packages.ts(refuseKnowledgeSourcePackageWrite,refuseDuplicatedKnowledgeSources): the guards at the package doors.Two-minute check:
pnpm --filter @objectstack/service-knowledge exec vitest run --maxWorkers=2 src/__tests__/knowledge-source-registry.test.ts src/__tests__/knowledge-source-loader.test.ts.Head
cf128e59f(review round 1). Verified so far on this head, locally, every heavy run underscripts/pm/os-verify-lock.sh: build exit 0;@objectstack/runtimefull suite exit 0 (657 files, 13676 passed, 25 skipped);@objectstack/metadata-coreand@objectstack/coreexit 0;tsc --noEmitonpackages/runtimeexit 0. Running now on the same head, and written here when they end: the other package suites, the workspace type check, the derived gates, the full dogfood battery and the ablations. CI on this head is in progress. The previous head's readings (45ed21271: 62 check runs green, 185 gates, the dogfood battery, six ablations) are in the os-dev report, comment 7206197293 on #37304.Skills readings (the diff touches
skills/**)skills/objectstack-platform/SKILL.mdskills/objectstack-ai/SKILL.mdSKILL.mdfiles togetherskills/objectstack-ai/references/_index.mdis generator-owned (53 lines to 52: the embedding module's row leaves, the knowledge source's row is reworded) and is measured, not ratcheted. "Before" ismainat the third merge (8b9b9d235), read with the same script; the bundle's before figure is this tree's reading less the row's 5 tokens.Remaining
45ed21271..cf128e59f), then the seat's hand-off.knowledge-pgvector'sdropSourcecontract cases have not run anywhere yet: there is no pgvector in the build container, and the job with a PostgreSQL service does not run onpull_request. Their first run is the merge queue.Human Minimum
packages/specholds no runtime logic.pnpm lintpasses.main, one pull request.packages/spectouched: its generated artifacts are regenerated and committed.content/docs/references/,packages/*/CHANGELOG.mdorcontent/docs/releases/.🤖 Generated with Claude Code
https://claude.ai/code/session_01Utp6CZe3KTAXogcUJuvYEx